SET(TARGET_NAME modbus)

include_directories(${CMAKE_ROOT_DIR}/lib/modbus)
include_directories(${CMAKE_ROOT_DIR}/lib/reg)

add_library(modbus-data STATIC
    expparser.cpp
    modbus-data.cpp)

add_library(${TARGET_NAME} SHARED
        modbus.cpp
        modbusdevice.cpp)

target_link_libraries(${TARGET_NAME} util_tools json idevice icom imodbus ireg modbus-data)

install(TARGETS ${TARGET_NAME}
        DESTINATION plugin)